<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="utf-8">
  
  <title>C++ 大数类(高精) | 探花需拔根</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
    <meta name="keywords" content="Bluarry,bluarry,Blog,探花,拔根,博客,区块链,算法,acm">
  
  <meta name="description" content="简介: 在刷题是，以前的大数类面对高精无能为力，之后学习一个模版供以后使用">
<meta name="keywords" content="c++,经验">
<meta property="og:type" content="article">
<meta property="og:title" content="C++ 大数类(高精)">
<meta property="og:url" content="/2019/08/08/2019-08-08-C++_大数类(高精)/index.html">
<meta property="og:site_name" content="探花需拔根">
<meta property="og:description" content="简介: 在刷题是，以前的大数类面对高精无能为力，之后学习一个模版供以后使用">
<meta property="og:locale" content="zh.yml">
<meta property="og:updated_time" content="2020-03-02T12:53:47.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="C++ 大数类(高精)">
<meta name="twitter:description" content="简介: 在刷题是，以前的大数类面对高精无能为力，之后学习一个模版供以后使用">
  
  
    <link rel="icon" href="/favicon.ico">
  
  <link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/css/style.css">
  <script src="/js/pace.min.js"></script>
  

  
  

  
<!-- Matomo -->
<script type="text/javascript">
	var _paq = window._paq || [];
	/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
	_paq.push(['trackPageView']);
	_paq.push(['enableLinkTracking']);
	(function() {
	  var u="//matomo.bluarry.top/";
	  _paq.push(['setTrackerUrl', u+'matomo.php']);
	  _paq.push(['setSiteId', '3']);
	  var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
	  g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
	})();
  </script>
  <!-- End Matomo Code -->

</head>
</html>
<body>
  <div id="container">
      <header id="header">
    <div id="banner"></div>
    <div id="header-outer">
        <div id="header-menu" class="header-menu-pos animated">
            <div class="header-menu-container">
                <a href="/" class="left">
                    <span class="site-title">探花需拔根</span>
                </a>
                <nav id="header-menu-nav" class="right">
                    
                    <a  href="/">
                        <i class="fa fa-home"></i>
                        <span>主页</span>
                    </a>
                    
                    <a  href="/archives">
                        <i class="fa fa-archive"></i>
                        <span>归档</span>
                    </a>
                    
                    <a  href="/friends">
                        <i class="fa fa-envira"></i>
                        <span>友链</span>
                    </a>
                    
                    <a  href="/about">
                        <i class="fa fa-user"></i>
                        <span>关于我</span>
                    </a>
                    
                </nav>
                <a class="mobile-header-menu-button">
                    <i class="fa fa-bars"></i>
                </a>
            </div>
        </div>
        <div id="header-row">
            <div id="logo">
                <a href="/">
                    <img src="/images/avatar/me-130x130.jpg" alt="logo">
                </a>
            </div>
            <div class="header-info">
                <div id="header-title">
                    
                    <h2>
                        清风觅影
                    </h2>
                    
                </div>
                <div id="header-description">
                    
                    <h3>
                        致需极,守静笃
                    </h3>
                    
                </div>
            </div>
            <nav class="header-nav">
                <div class="social">
                    
                        <a title="Home"  href="/">
                            <i class="fa fa-home fa-2x"></i></a>
                    
                        <a title="Github" target="_blank" href="//github.com/bluarry">
                            <i class="fa fa-github fa-2x"></i></a>
                    
                        <a title="mail" target="_blank" href="mailto://bluarry@qq.com">
                            <i class="fa fa-envelope-o fa-2x"></i></a>
                    
                </div>
            </nav>
        </div>
    </div>
</header>
      <div class="outer">
        <section id="main" class="body-wrap"><article id="post-2019-08-08-C++_大数类(高精)" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-inner">
    
      <header class="article-header">
        
  
    <h1 class="post-title" itemprop="name">
      C++ 大数类(高精)
    </h1>
    <div class="post-title-bar">
      <ul>
          
              <li>
                  <i class="fa fa-book"></i>
                  
                      <a href="/categories/经验分享/">经验分享</a>
                  
              </li>
          
        <li>
          <i class="fa fa-calendar"></i>  2019-08-08
        </li>
        <li>
          <i class="fa fa-eye"></i>
          <span id="busuanzi_value_page_pv"></span>
        </li>
      </ul>
    </div>
  

          
      </header>
    
    <div class="article-entry post-content" itemprop="articleBody">
      
            
            <blockquote>
<p>简介: 在刷题是，以前的大数类面对高精无能为力，之后学习一个模版供以后使用<br><a id="more"></a><br><a href="http://www.51nod.com/Challenge/Problem.html#problemId=1005" target="_blank" rel="noopener">学习自51nod</a></p>
</blockquote>
<pre><code class="language-cpp line-numbers"><br>\#include&lt;bits/stdc++.h&gt;
using namespace std;
typedef long long ll;
//#define int ll
#ifdef DEBUG
#define CERR cerr
#endif
#ifndef DEBUG
#define CERR if(false)cerr
#endif
#define iter iterator
#define fake true
inline long long llread() {long long x;scanf("%lld",&amp;x);return x;}
inline signed read() {signed x;scanf("%d",&amp;x);return x;}
void llwrite(long long x) {printf("%lld",x);}
void write(signed x) {printf("%d",x);}

//高精功能
    class BigInteger {
    private:
        static const signed BASE = 100000000;
        static const signed WIDTH = 8;
        bool sign;
        size_t length;
        vector&lt;signed&gt; num;

        void cutLeadingZero();
        void setLength();

    public:
        BigInteger(signed n = 0);
        BigInteger(long long n);
        BigInteger(const char *n);
        BigInteger(const BigInteger &amp;n);

        const BigInteger&amp; operator=(signed n);
        const BigInteger&amp; operator=(long long n);
        const BigInteger&amp; operator=(const char *n);
        const BigInteger&amp; operator=(const BigInteger &amp;n);

        size_t size() const;
        BigInteger e(size_t n) const;
        BigInteger abs() const;

        const BigInteger&amp; operator+() const;
        friend BigInteger operator+(const BigInteger &amp;a, const BigInteger &amp;b);
        const BigInteger&amp; operator+=(const BigInteger &amp;n);
        const BigInteger&amp; operator++();
        BigInteger operator++(signed);

        BigInteger operator-() const;
        friend BigInteger operator-(const BigInteger &amp;a, const BigInteger &amp;b);
        const BigInteger&amp; operator-=(const BigInteger &amp;n);
        const BigInteger&amp; operator--();
        BigInteger operator--(signed);

        friend BigInteger operator*(const BigInteger &amp;a, const BigInteger &amp;b);
        const BigInteger&amp; operator*=(const BigInteger &amp;n);

        friend BigInteger operator/(const BigInteger &amp;a, const BigInteger &amp;b);
        const BigInteger&amp; operator/=(const BigInteger &amp;n);

        friend BigInteger operator%(const BigInteger &amp;a, const BigInteger &amp;b);
        const BigInteger&amp; operator%=(const BigInteger &amp;n);

        friend bool operator&lt;(const BigInteger &amp;a, const BigInteger &amp;b);
        friend bool operator&lt;=(const BigInteger &amp;a, const BigInteger &amp;b);
        friend bool operator&gt;(const BigInteger &amp;a, const BigInteger &amp;b);
        friend bool operator&gt;=(const BigInteger &amp;a, const BigInteger &amp;b);
        friend bool operator==(const BigInteger &amp;a, const BigInteger &amp;b);
        friend bool operator!=(const BigInteger &amp;a, const BigInteger &amp;b);

        friend bool operator||(const BigInteger &amp;a, const BigInteger &amp;b);
        friend bool operator&amp;&amp;(const BigInteger &amp;a, const BigInteger &amp;b);
        bool operator!();

        friend ostream&amp; operator&lt;&lt;(ostream &amp;out, const BigInteger &amp;n);
        friend istream&amp; operator&gt;&gt;(istream &amp;in, BigInteger &amp;n);
    };


    void BigInteger::cutLeadingZero() {
        while(num.back() == 0 &amp;&amp; num.size() != 1) {
            num.pop_back();
        }
    }

    void BigInteger::setLength() {
        cutLeadingZero();
        signed tmp = num.back();
        if(tmp == 0) {
            length = 1;
        } else {
            length = (num.size() - 1) * 8;
            while(tmp &gt; 0) {
                ++length;
                tmp /= 10;
            }
        }
    }

    BigInteger::BigInteger(signed n) {
        *this = n;
    }

    BigInteger::BigInteger(long long n) {
        *this = n;
    }

    BigInteger::BigInteger(const char *n) {
        *this = n;
    }

    BigInteger::BigInteger(const BigInteger &amp;n) {
        *this = n;
    }

    const BigInteger&amp; BigInteger::operator=(signed n) {
        *this = (long long)n;
        return *this;
    }

    const BigInteger&amp; BigInteger::operator=(long long n) {
        num.clear();
        if(n == 0) {
            num.push_back(0);
        }
        if(n &gt;= 0) {
            sign = true;
        } else if(n == LONG_LONG_MIN) {
            *this = "-9223372036854775808";
            return *this;
        } else if(n &lt; 0) {
            sign = false;
            n = -n;
        }
        while(n != 0) {
            num.push_back(n % BASE);
            n /= BASE;
        }
        setLength();
        return *this;
    }

    const BigInteger&amp; BigInteger::operator=(const char *n) {
        signed len = strlen(n);
        signed tmp = 0;
        signed ten = 1;
        signed stop = 0;
        num.clear();
        sign = (n[0] != '-');
        if(!sign) {
            stop = 1;
        }
        for(signed i = len; i &gt; stop; --i) {
            tmp += (n[i - 1] - '0') * ten;
            ten *= 10;
            if((len - i) % 8 == 7) {
                num.push_back(tmp);
                tmp = 0;
                ten = 1;
            }
        }
        if((len - stop) % WIDTH != 0) {
            num.push_back(tmp);
        }
        setLength();
        return *this;
    }

    const BigInteger&amp; BigInteger::operator=(const BigInteger &amp;n) {
        num = n.num;
        sign = n.sign;
        length = n.length;
        return *this;
    }

    size_t BigInteger::size() const {
        return length;
    }

    BigInteger BigInteger::e(size_t n) const {
        signed tmp = n % 8;
        BigInteger ans;
        ans.length = n + 1;
        n /= 8;
        while(ans.num.size() &lt;= n) {
            ans.num.push_back(0);
        }
        ans.num[n] = 1;
        while(tmp--) {
            ans.num[n] *= 10;
        }
        return ans * (*this);
    }

    BigInteger BigInteger::abs() const {
        BigInteger ans(*this);
        ans.sign = true;
        return ans;
    }

    const BigInteger&amp; BigInteger::operator+() const {
        return *this;
    }

    BigInteger operator+(const BigInteger &amp;a, const BigInteger &amp;b) {
        if(!b.sign) {
            return a - (-b);
        }
        if(!a.sign) {
            return b - (-a);
        }
        BigInteger ans;
        signed carry = 0;
        signed aa, bb;
        size_t lena = a.num.size();
        size_t lenb = b.num.size();
        size_t len = max(lena, lenb);
        ans.num.clear();
        for(size_t i = 0; i &lt; len; ++i) {
            if(lena &lt;= i) {
                aa = 0;
            } else {
                aa = a.num[i];
            }
            if(lenb &lt;= i) {
                bb = 0;
            } else {
                bb = b.num[i];
            }
            ans.num.push_back((aa + bb + carry) % BigInteger::BASE);
            carry = (aa + bb + carry) / BigInteger::BASE;
        }
        if(carry &gt; 0) {
            ans.num.push_back(carry);
        }
        ans.setLength();
        return ans;
    }

    const BigInteger&amp; BigInteger::operator+=(const BigInteger &amp;n) {
        *this = *this + n;
        return *this;
    }

    const BigInteger&amp; BigInteger::operator++() {
        *this = *this + 1;
        return *this;
    }

    BigInteger BigInteger::operator++(signed) {
        BigInteger ans(*this);
        *this = *this + 1;
        return ans;
    }

    BigInteger BigInteger::operator-() const {
        BigInteger ans(*this);
        if(ans != 0) {
            ans.sign = !ans.sign;
        }
        return ans;
    }

    BigInteger operator-(const BigInteger &amp;a, const BigInteger &amp;b) {
        if(!b.sign) {
            return a + (-b);
        }
        if(!a.sign) {
            return -((-a) + b);
        }
        if(a &lt; b) {
            return -(b - a);
        }
        BigInteger ans;
        signed carry = 0;
        signed aa, bb;
        size_t lena = a.num.size();
        size_t lenb = b.num.size();
        size_t len = max(lena, lenb);
        ans.num.clear();
        for(size_t i = 0; i &lt; len; ++i) {
            aa = a.num[i];
            if(i &gt;= lenb) {
                bb = 0;
            } else {
                bb = b.num[i];
            }
            ans.num.push_back((aa - bb - carry + BigInteger::BASE) % BigInteger::BASE);
            if(aa &lt; bb + carry) {
                carry = 1;
            } else {
                carry = 0;
            }
        }
        ans.setLength();
        return ans;
    }

    const BigInteger&amp; BigInteger::operator-=(const BigInteger &amp;n) {
        *this = *this - n;
        return *this;
    }

    const BigInteger&amp; BigInteger::operator--() {
        *this = *this - 1;
        return *this;
    }

    BigInteger BigInteger::operator--(signed) {
        BigInteger ans(*this);
        *this = *this - 1;
        return ans;
    }

    BigInteger operator*(const BigInteger &amp;a, const BigInteger&amp;b) {
        size_t lena = a.num.size();
        size_t lenb = b.num.size();
        vector&lt;long long&gt; ansLL;
        for(size_t i = 0; i &lt; lena; ++i) {
            for(size_t j = 0; j &lt; lenb; ++j) {
                if(i + j &gt;= ansLL.size()) {
                    ansLL.push_back((long long)a.num[i] * (long long)b.num[j]);
                } else {
                    ansLL[i + j] += (long long)a.num[i] * (long long)b.num[j];
                }
            }
        }
        while(ansLL.back() == 0 &amp;&amp; ansLL.size() != 1) {
            ansLL.pop_back();
        }
        size_t len = ansLL.size();
        long long carry = 0;
        long long tmp;
        BigInteger ans;
        ans.sign = (ansLL.size() == 1 &amp;&amp; ansLL[0] == 0) || (a.sign == b.sign);
        ans.num.clear();
        for(size_t i = 0; i &lt; len; ++i) {
            tmp = ansLL[i];
            ans.num.push_back((tmp + carry) % BigInteger::BASE);
            carry = (tmp + carry) / BigInteger::BASE;
        }
        if(carry &gt; 0) {
            ans.num.push_back(carry);
        }
        ans.setLength();
        return ans;
    }

    const BigInteger&amp; BigInteger::operator*=(const BigInteger &amp;n) {
        *this = *this * n;
        return *this;
    }

    BigInteger operator/(const BigInteger &amp;a, const BigInteger &amp;b) {
        BigInteger aa(a.abs());
        BigInteger bb(b.abs());
        if(aa &lt; bb) {
            return 0;
        }
        char *str = new char[aa.size() + 1];
        memset(str, 0, sizeof(char) * (aa.size() + 1));
        BigInteger tmp;
        signed lena = aa.length;
        signed lenb = bb.length;
        for(signed i = 0; i &lt;= lena - lenb; ++i) {
            tmp = bb.e(lena - lenb - i);
            while(aa &gt;= tmp) {
                ++str[i];
                aa = aa - tmp;
            }
            str[i] += '0';
        }

        BigInteger ans(str);
        delete[]str;
        ans.sign = (ans == 0 || a.sign == b.sign);
        return ans;
    }

    const BigInteger&amp; BigInteger::operator/=(const BigInteger &amp;n) {
        *this = *this / n;
        return *this;
    }

    BigInteger operator%(const BigInteger &amp;a, const BigInteger &amp;b) {
        return a - a / b * b;
    }

    const BigInteger&amp; BigInteger::operator%=(const BigInteger &amp;n) {
        *this = *this - *this / n * n;
        return *this;
    }

    bool operator&lt;(const BigInteger &amp;a, const BigInteger &amp;b) {
        if(a.sign &amp;&amp; !b.sign) {
            return false;
        } else if(!a.sign &amp;&amp; b.sign) {
            return true;
        } else if(a.sign &amp;&amp; b.sign) {
            if(a.length &lt; b.length) {
                return true;
            } else if(a.length &gt; b.length) {
                return false;
            } else {
                size_t lena = a.num.size();
                for(signed i = lena - 1; i &gt;= 0; --i) {
                    if(a.num[i] &lt; b.num[i]) {
                        return true;
                    } else if(a.num[i] &gt; b.num[i]) {
                        return false;
                    }
                }
                return false;
            }
        } else {
            return -b &lt; -a;
        }
    }

    bool operator&lt;=(const BigInteger &amp;a, const BigInteger &amp;b) {
        return !(b &lt; a);
    }

    bool operator&gt;(const BigInteger &amp;a, const BigInteger &amp;b) {
        return b &lt; a;
    }

    bool operator&gt;=(const BigInteger &amp;a, const BigInteger &amp;b) {
        return !(a &lt; b);
    }

    bool operator==(const BigInteger &amp;a, const BigInteger &amp;b) {
        return !(a &lt; b) &amp;&amp; !(b &lt; a);
    }

    bool operator!=(const BigInteger &amp;a, const BigInteger &amp;b) {
        return (a &lt; b) || (b &lt; a);
    }

    bool operator||(const BigInteger &amp;a, const BigInteger &amp;b) {
        return a != 0 || b != 0;
    }

    bool operator&amp;&amp;(const BigInteger &amp;a, const BigInteger &amp;b) {
        return a != 0 &amp;&amp; b != 0;
    }

    bool BigInteger::operator!() {
        return *this == 0;
    }

    ostream&amp; operator&lt;&lt;(ostream &amp;out, const BigInteger &amp;n) {
        size_t len = n.num.size();
        if(!n.sign) {
            out &lt;&lt; '-';
        }
        out &lt;&lt; n.num.back();
        for(signed i = len - 2; i &gt;= 0; --i) {
            out &lt;&lt; setw(BigInteger::WIDTH) &lt;&lt; setfill('0') &lt;&lt; n.num[i];
        }
        return out;
    }

    istream&amp; operator&gt;&gt;(istream &amp;in, BigInteger &amp;n) {
        string str;
        in &gt;&gt; str;
        size_t len = str.length();
        size_t i, start = 0;
        if(str[0] == '-') {
            start = 1;
        }
        if(str[start] == '\0') {
            return in;
        }
        for(i = start; i &lt; len; ++i) {
            if(str[i] &lt; '0' || str[i] &gt; '9') {
                return in;
            }
        }
        n = str.c_str();
        return in;
    }
////////////////

BigInteger a,b;

signed main() {
    ios::sync_with_stdio(false);
    cin&gt;&gt;a&gt;&gt;b;
    cout&lt;&lt;a+b&lt;&lt;endl;
}

</code></pre>
            <div class="post-copyright">
    <div class="content">
        <p>最后更新： 2020年03月02日 20:53</p>
        <p>原始链接： <a class="post-url" href="/2019/08/08/2019-08-08-C++_大数类(高精)/" title="C++ 大数类(高精)">/2019/08/08/2019-08-08-C++_大数类(高精)/</a></p>
        <footer>
            <a href="">
                <img src="/images/avatar/me-130x130.jpg" alt="bluarry">
                bluarry
            </a>
        </footer>
    </div>
</div>

      
        
            
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;">赏</a>
</div>

<div id="reward" class="post-modal reward-lay">
    <a class="close" href="javascript:;" id="reward-close">×</a>
    <span class="reward-title">
        <i class="icon icon-quote-left"></i>
        请我吃糖~
        <i class="icon icon-quote-right"></i>
    </span>
    <div class="reward-content">
        
        <div class="reward-code">
            <img id="rewardCode" src="/images/wechat_code.jpg" alt="打赏二维码">
        </div>
        <div class="reward-select">
            
            <label class="reward-select-item checked" data-id="wechat" data-wechat="/images/wechat_code.jpg">
                <img class="reward-select-item-wechat" src="/images/wechat.png" alt="微信">
            </label>
            
            
            <label class="reward-select-item" data-id="alipay" data-alipay="/images/alipay_code.jpg">
                <img class="reward-select-item-alipay" src="/images/alipay.png" alt="支付宝">
            </label>
            
        </div>
    </div>
</div>


        
    </div>
    <footer class="article-footer">
        
        
<div class="post-share">
    <a href="javascript:;" id="share-sub" class="post-share-fab">
        <i class="fa fa-share-alt"></i>
    </a>
    <div class="post-share-list" id="share-list">
        <ul class="share-icons">
          <li>
            <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=/2019/08/08/2019-08-08-C++_大数类(高精)/&title=《C++ 大数类(高精)》 — 探花需拔根&pic=images/avatar/me-130x130.jpg" data-title="微博">
              <i class="fa fa-weibo"></i>
            </a>
          </li>
          <li>
            <a class="weixin share-sns" id="wxFab" href="javascript:;" data-title="微信">
              <i class="fa fa-weixin"></i>
            </a>
          </li>
          <li>
            <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=/2019/08/08/2019-08-08-C++_大数类(高精)/&title=《C++ 大数类(高精)》 — 探花需拔根&source=
简介: 在刷题是，以前的大数类面对高精无能为力，之后学习一个模版供以后使用" data-title="QQ">
              <i class="fa fa-qq"></i>
            </a>
          </li>
          <li>
            <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=/2019/08/08/2019-08-08-C++_大数类(高精)/" data-title="Facebook">
              <i class="fa fa-facebook"></i>
            </a>
          </li>
          <li>
            <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《C++ 大数类(高精)》 — 探花需拔根&url=/2019/08/08/2019-08-08-C++_大数类(高精)/&via=" data-title="Twitter">
              <i class="fa fa-twitter"></i>
            </a>
          </li>
          <li>
            <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=/2019/08/08/2019-08-08-C++_大数类(高精)/" data-title="Google+">
              <i class="fa fa-google-plus"></i>
            </a>
          </li>
        </ul>
     </div>
</div>
<div class="post-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;" id="wxShare-close">×</a>
    <p>扫一扫，分享到微信</p>
    <img src="" alt="微信分享二维码">
</div>

<div class="mask"></div>

        
        <ul class="article-footer-menu">
            
            
  <li class="article-footer-tags">
    <i class="fa fa-tags"></i>
      
    <a href="/tags/c++/" class="color4">c++</a>
      
    <a href="/tags/经验/" class="color3">经验</a>
      
  </li>

        </ul>
        
        


<nav id="article-nav">
  
    <a href="/2019/10/30/2019-10-30-mac下利用timemachine备份系统到dmg文件/" id="article-nav-newer" class="article-nav-link-wrap">

      <span class="article-nav-title">
        <i class="fa fa-hand-o-left" aria-hidden="true"></i>
        
          mac下利用timemachine备份系统到dmg文件
        
      </span>
    </a>
  
  
    <a href="/2019/05/26/2019-05-26-Struts2的循环标签的使用/" id="article-nav-older" class="article-nav-link-wrap">
      <span class="article-nav-title">Struts2的循环标签的使用</span>
      <i class="fa fa-hand-o-right" aria-hidden="true"></i>
    </a>
  
</nav>




    <!-- HTML页面布局 -->
    <div id="tab-list">
        <ul id="ul1">
            
            
            
            <li id="gittalk" style="width: 25%;">gittalk</li>
            
            
            <li id="valine" style="width: 25%;">valine</li>
            
        </ul>
         
        
          
        <div id="dv_gitment" class="hide">
            <div id="git_comments"></div>;
        </div>
        
        
        <div id="dv_vment" class="show">
            <div class="comments vcomment" id="vcomments"></div>
        </div>
        
    </div>

    <script src="/js/tablist.js"></script>
   

    
        
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
<script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>
<script src="https://cdn.bluarry.top/cdn/js/md5.min.js"></script>
<!--<div id="git_comments"></div>-->
<script>
    // var gitment = new Gitment({
    //     owner: 'bluarry',
    //     repo: 'blog_comment',
    //     oauth: {
    //         client_id: '5c95f5b820d109c8f5c1',
    //         client_secret: 'f1cfe5b08f9a55923ba26a9ec8855b631002ad18',
    //     },
    // })
    var hrefs=location.href;
    var links=hrefs.split('/');
    var cr="";
    for (var i=0;i<Math.min(7,links.length);i++) {
        cr+=links[i];
    }
    console.log(cr);

    var gitalk = new Gitalk({
        clientID: '5c95f5b820d109c8f5c1', //Client ID
        clientSecret: 'f1cfe5b08f9a55923ba26a9ec8855b631002ad18', //Client Secret
        repo: 'blog_comment',//仓库名称
        owner: 'bluarry',//仓库拥有者
        admin: ['bluarry'],
        id: md5(cr),      // Ensure uniqueness and length less than 50
        distractionFreeMode: false  // Facebook-like distraction free mode
    });
    gitalk.render('git_comments');
</script>


    
        <!-- Valine Comments -->
<!-- <div class="comments vcomment" id="vcomments"></div>-->
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//unpkg.com/valine@latest/dist/Valine.min.js"></script>
<!-- Valine Comments script -->
<script>
    var GUEST_INFO = ['nick','mail','link'];
    var guest_info = 'nick,mail'.split(',').filter(function(item){
        return GUEST_INFO.indexOf(item) > -1
    });
    new Valine({
        el: '#vcomments',
        notify: 'true' == 'true',
        verify: 'false' == 'true',
        appId: "DRrkhLYTmB6QwGy6sI6vCH8C-gzGzoHsz",
        appKey: "M4A4lrKwbixQmmeO5lVdY5l2",
        avatar: "mm",
        placeholder: "少侠，留下你的评论吧",
        guest_info: guest_info.length == 0 ? GUEST_INFO : guest_info,
        pageSize: "10"
    })
</script>
<!-- Valine Comments end -->

    


    </footer>
  </div>
</article>


</section>
        
      </div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info" class="inner">
      
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        <i class="fa fa-user"></i>&nbsp;&nbsp;<span id="busuanzi_value_site_uv"></span>
    </span>&nbsp;&nbsp;|&nbsp;&nbsp;
    <span id="busuanzi_container_site_pv" style='display:none'>
        <i class="fa fa-eye"></i> &nbsp;&nbsp;<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


      <p>
      &copy; 2016-2021 &nbsp;&nbsp;<i style="color: red;" class="fa fa-heart"></i>&nbsp;&nbsp; bluarry
      备案号: <a style="color: #999;" href="http://www.beian.miit.gov.cn/" target="_blank">陕ICP备2020012959号</a>
    </p>

    </div>
  </div>
</footer>
    <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script>
  var mihoConfig = {
      root: "",
      animate: true,
      isHome: false,
      share: true,
      reward: 1
  }
</script>
<div class="sidebar">
    <div id="sidebar-search" title="Search">
        <i class="fa fa-search"></i>
    </div>
    <div id="sidebar-category" title="Categories">
        <i class="fa fa-book"></i>
    </div>
    <div id="sidebar-tag" title="Tags">
        <i class="fa fa-tags"></i>
    </div>
    <div id="sidebar-top">
        <span class="sidebar-top-icon"><i class="fa fa-angle-up"></i></span>
    </div>
</div>
<div class="sidebar-menu-box" id="sidebar-menu-box">
    <div class="sidebar-menu-box-container">
        <div id="sidebar-menu-box-categories">
            <a class="category-link" href="/categories/linux/">linux</a><a class="category-link" href="/categories/linux-学习/">linux 学习</a><a class="category-link" href="/categories/linux-学习-acm-onlinejudge-hustoj/">linux 学习 acm onlinejudge hustoj</a><a class="category-link" href="/categories/学习分享/">学习分享</a><a class="category-link" href="/categories/数据结构/">数据结构</a><a class="category-link" href="/categories/经验分享/">经验分享</a><a class="category-link" href="/categories/经验分享/学习分享/">学习分享</a><a class="category-link" href="/categories/默认分类/">默认分类</a><a class="category-link" href="/categories/默认分类/复习/">复习</a><a class="category-link" href="/categories/默认分类/复习/学习分享/">学习分享</a><a class="category-link" href="/categories/默认分类/学习分享/">学习分享</a><a class="category-link" href="/categories/默认分类/生活杂谈/">生活杂谈</a><a class="category-link" href="/categories/默认分类/经验分享/">经验分享</a><a class="category-link" href="/categories/默认分类/经验分享/学习分享/">学习分享</a>
        </div>
        <div id="sidebar-menu-box-tags">
            <a href="/tags/Java/" style="font-size: 10px;">Java</a> <a href="/tags/acm/" style="font-size: 12.86px;">acm</a> <a href="/tags/android/" style="font-size: 11.43px;">android</a> <a href="/tags/c/" style="font-size: 14.29px;">c++</a> <a href="/tags/fabric/" style="font-size: 11.43px;">fabric</a> <a href="/tags/kali/" style="font-size: 10px;">kali</a> <a href="/tags/linux/" style="font-size: 15.71px;">linux</a> <a href="/tags/linux学习/" style="font-size: 10px;">linux学习</a> <a href="/tags/mac/" style="font-size: 10px;">mac</a> <a href="/tags/mfc/" style="font-size: 10px;">mfc</a> <a href="/tags/onlinejudge/" style="font-size: 10px;">onlinejudge</a> <a href="/tags/sqlite/" style="font-size: 10px;">sqlite</a> <a href="/tags/sqlite3/" style="font-size: 11.43px;">sqlite3</a> <a href="/tags/ss/" style="font-size: 10px;">ss</a> <a href="/tags/vs/" style="font-size: 11.43px;">vs</a> <a href="/tags/xposed/" style="font-size: 10px;">xposed</a> <a href="/tags/xposed模块/" style="font-size: 10px;">xposed模块</a> <a href="/tags/专业知识/" style="font-size: 10px;">专业知识</a> <a href="/tags/侧链/" style="font-size: 10px;">侧链</a> <a href="/tags/内网穿透/" style="font-size: 10px;">内网穿透</a> <a href="/tags/区块链/" style="font-size: 11.43px;">区块链</a> <a href="/tags/复习/" style="font-size: 10px;">复习</a> <a href="/tags/学习/" style="font-size: 18.57px;">学习</a> <a href="/tags/安卓/" style="font-size: 12.86px;">安卓</a> <a href="/tags/小技巧/" style="font-size: 17.14px;">小技巧</a> <a href="/tags/数据库/" style="font-size: 10px;">数据库</a> <a href="/tags/数据结构/" style="font-size: 10px;">数据结构</a> <a href="/tags/日常使用问题/" style="font-size: 10px;">日常使用问题</a> <a href="/tags/最小生成树/" style="font-size: 11.43px;">最小生成树</a> <a href="/tags/最短路径/" style="font-size: 10px;">最短路径</a> <a href="/tags/比特币/" style="font-size: 11.43px;">比特币</a> <a href="/tags/算法/" style="font-size: 12.86px;">算法</a> <a href="/tags/算法笔记/" style="font-size: 11.43px;">算法笔记</a> <a href="/tags/经验/" style="font-size: 20px;">经验</a> <a href="/tags/编译原理/" style="font-size: 10px;">编译原理</a> <a href="/tags/翻译/" style="font-size: 10px;">翻译</a> <a href="/tags/自然计算/" style="font-size: 10px;">自然计算</a>
        </div>
    </div>
    <a href="javascript:;" class="sidebar-menu-box-close">&times;</a>
</div>
<div class="mobile-header-menu-nav" id="mobile-header-menu-nav">
    <div class="mobile-header-menu-container">
        <span class="title">Menus</span>
        <ul class="mobile-header-menu-navbar">
            
            <li>
                <a  href="/">
                    <i class="fa fa-home"></i><span>主页</span>
                </a>
            </li>
            
            <li>
                <a  href="/archives">
                    <i class="fa fa-archive"></i><span>归档</span>
                </a>
            </li>
            
            <li>
                <a  href="/friends">
                    <i class="fa fa-envira"></i><span>友链</span>
                </a>
            </li>
            
            <li>
                <a  href="/about">
                    <i class="fa fa-user"></i><span>关于我</span>
                </a>
            </li>
            
        </ul>
    </div>
    <div class="mobile-header-tag-container">
        <span class="title">Tags</span>
        <div id="mobile-header-container-tags">
            <a href="/tags/Java/" style="font-size: 10px;">Java</a> <a href="/tags/acm/" style="font-size: 12.86px;">acm</a> <a href="/tags/android/" style="font-size: 11.43px;">android</a> <a href="/tags/c/" style="font-size: 14.29px;">c++</a> <a href="/tags/fabric/" style="font-size: 11.43px;">fabric</a> <a href="/tags/kali/" style="font-size: 10px;">kali</a> <a href="/tags/linux/" style="font-size: 15.71px;">linux</a> <a href="/tags/linux学习/" style="font-size: 10px;">linux学习</a> <a href="/tags/mac/" style="font-size: 10px;">mac</a> <a href="/tags/mfc/" style="font-size: 10px;">mfc</a> <a href="/tags/onlinejudge/" style="font-size: 10px;">onlinejudge</a> <a href="/tags/sqlite/" style="font-size: 10px;">sqlite</a> <a href="/tags/sqlite3/" style="font-size: 11.43px;">sqlite3</a> <a href="/tags/ss/" style="font-size: 10px;">ss</a> <a href="/tags/vs/" style="font-size: 11.43px;">vs</a> <a href="/tags/xposed/" style="font-size: 10px;">xposed</a> <a href="/tags/xposed模块/" style="font-size: 10px;">xposed模块</a> <a href="/tags/专业知识/" style="font-size: 10px;">专业知识</a> <a href="/tags/侧链/" style="font-size: 10px;">侧链</a> <a href="/tags/内网穿透/" style="font-size: 10px;">内网穿透</a> <a href="/tags/区块链/" style="font-size: 11.43px;">区块链</a> <a href="/tags/复习/" style="font-size: 10px;">复习</a> <a href="/tags/学习/" style="font-size: 18.57px;">学习</a> <a href="/tags/安卓/" style="font-size: 12.86px;">安卓</a> <a href="/tags/小技巧/" style="font-size: 17.14px;">小技巧</a> <a href="/tags/数据库/" style="font-size: 10px;">数据库</a> <a href="/tags/数据结构/" style="font-size: 10px;">数据结构</a> <a href="/tags/日常使用问题/" style="font-size: 10px;">日常使用问题</a> <a href="/tags/最小生成树/" style="font-size: 11.43px;">最小生成树</a> <a href="/tags/最短路径/" style="font-size: 10px;">最短路径</a> <a href="/tags/比特币/" style="font-size: 11.43px;">比特币</a> <a href="/tags/算法/" style="font-size: 12.86px;">算法</a> <a href="/tags/算法笔记/" style="font-size: 11.43px;">算法笔记</a> <a href="/tags/经验/" style="font-size: 20px;">经验</a> <a href="/tags/编译原理/" style="font-size: 10px;">编译原理</a> <a href="/tags/翻译/" style="font-size: 10px;">翻译</a> <a href="/tags/自然计算/" style="font-size: 10px;">自然计算</a>
        </div>
    </div>
</div>
<div class="search-wrap">
    <span class="search-close">&times;</span>
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
            <i class="icon icon-lg icon-chevron-left"></i>
        </a>
        <input class="search-field" placeholder="Search..." id="keywords">
        <a id="search-submit" href="javascript:;">
            <i class="fa fa-search"></i>
        </a>
    <div class="search-container" id="search-container">
        <ul class="search-result" id="search-result">
        </ul>
    </div>
</div>

<div id="search-tpl">
    <li class="search-result-item">
        <a href="{url}" class="search-item-li">
            <span class="search-item-li-title" title="{title}">{title}</span>
        </a>
    </li>
</div>
<script src="/js/search.js"></script>
<script src="/js/main.js"></script>


  <script src="//cdn.bootcss.com/particles.js/2.0.0/particles.min.js"></script>
  <div id="particles"></div>
  <script src="/js/particles.js"></script>







  <link rel="stylesheet" href="//cdn.bootcss.com/animate.css/3.5.0/animate.min.css">
  <script src="//cdn.bootcss.com/scrollReveal.js/3.0.5/scrollreveal.js"></script>
  <script src="/js/animate.js"></script>


  <script src="/js/pop-img.js"></script>
  <script>
     $(".article-entry p img").popImg();
  </script>

  </div>
</body>
</html>